var r = require('../../../../@babel/runtime/helpers/typeof');
function e(r) {
    return /(ht|f)tp(s?):\/\/([^ \\/]*\.)+[^ \\/]*(:[0-9]+)?\/?/.test(r);
}
function t(r) {
    return /data:image\/(\w+);base64,(.*)/.test(r);
}
module.exports = {
    isValidUrl: function (r) {
        return e(r) || t(r);
    },
    isOnlineUrl: e,
    isDataUrl: t,
    equal: function e(t, n) {
        if (t === n) {
            return true;
        }
        if (t && n && 'object' == r(t) && 'object' == r(n)) {
            var i;
            var a;
            var f;
            var u = Array.isArray(t);
            var o = Array.isArray(n);
            if (u && o) {
                if ((a = t.length) != n.length) {
                    return false;
                }
                for (i = a; 0 != i--; ) {
                    if (!e(t[i], n[i])) {
                        return false;
                    }
                }
                return true;
            }
            if (u != o) {
                return false;
            }
            var s = t instanceof Date;
            var c = n instanceof Date;
            if (s != c) {
                return false;
            }
            if (s && c) {
                return t.getTime() == n.getTime();
            }
            var l = t instanceof RegExp;
            var g = n instanceof RegExp;
            if (l != g) {
                return false;
            }
            if (l && g) {
                return t.toString() == n.toString();
            }
            var p = Object.keys(t);
            if ((a = p.length) !== Object.keys(n).length) {
                return false;
            }
            for (i = a; 0 != i--; ) {
                if (!Object.prototype.hasOwnProperty.call(n, p[i])) {
                    return false;
                }
            }
            for (i = a; 0 != i--; ) {
                if (!e(t[(f = p[i])], n[f])) {
                    return false;
                }
            }
            return true;
        }
        return t != t && n != n;
    }
};
